﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FileReporter.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the FileReporter type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Reporting
{
    /// <summary>
    /// </summary>
    public class FileReporter : ReporterBase
    {
        private string filePath;
        private string fileName;

        #region Public Properites

        /// <summary>
        /// Gets or sets the name of the file to be
        /// used as the log file.
        /// </summary>
        /// <value>The name of the file.</value>
        public string FileName
        {
            get
            {
                return this.fileName;
            }
            set
            {
                this.fileName = value;
            }
        }

        /// <summary>
        /// Gets or sets the directory of the file to be
        /// used as the Reporting File.
        /// If trailing slash '\' is not included, then one 
        /// is appended.
        /// </summary>
        /// <value>The name of the file.</value>
        public string FilePath
        {
            get
            {
                return this.filePath;
            }
            set
            {
                if (value.Substring(value.Length - 1, 1) != @"\")
                {
                    value = value + @"\";
                }
                this.filePath = value;
            }

        }

        /// <summary>
        /// Gets the full log path.
        /// </summary>
        /// <value>The full log path.</value>
        public string FullLogPath
        {
            get
            {
                return this.FilePath + this.FileName;
            }
        }

        #endregion

    }
}